package com.mmg.common;

import com.baidu.aip.face.AipFace;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class BaiduFaceApi {
    @Value("${baidu.face.appId}")
    public String APP_ID;
    @Value("${baidu.face.apiKey}")
    public String API_KEY;
    @Value("${baidu.face.secretKey}")
    public String SECRET_KEY;

    public AipFace getAipFace() {
        // 初始化一个AipFace
        return new AipFace(APP_ID, API_KEY, SECRET_KEY);
    }
}
